home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Prog / Q-R / QB Graphics.sea / segmaker.bas < prev    next >
BASIC Source File  |  1991-06-04  |  2KB  |  54 lines

  1. '------------------------------------------------------------------------------
  2. ' TITLE:    segmaker
  3. ' DATE:     March 11, 1991
  4. ' AUTHOR: R. Gonzalez
  5. '
  6. ' DESCRIPTION:  Makes a boring segment for viewing with segview
  7. '
  8. ' COMPILING:    Remove STATIC declarations, uncomment indicated lines
  9. '     Check: Include MBPCs & MBLCs, Include runtime code, Make all arrays static,
  10. '     Use default window & menu, (if available: Generate 68020 & 68881 code).
  11. '
  12. ' (MODIFICATION HISTORY)
  13. ' DATE:      
  14. ' AUTHOR: 
  15. ' DESCRIPTION:   
  16. '------------------------------------------------------------------------------
  17.  
  18. 'MAIN
  19.  
  20.     DIM a$,b$,filename$
  21.     
  22.     SHOWPEN        ' show segments while creating them.  The "showlevel" is usually
  23.     '    1, meaning that things are drawn.  The PICTURE ON statement decrements the
  24.     '    showlevel by 1, so nothing is drawn.  However, SHOWPEN increments the showlevel
  25.     '    by 1.  Likewise, HIDEPEN decrements the showlevel by 1 and PICTURE OFF increments
  26.     '    the showlevel by 1.  Things are drawn as long as the showlevel is greater or equal
  27.     '    to 1.
  28.  
  29.     PICTURE ON
  30.     backcolor 33
  31.     CLS                ' note - the screen is cleared when segment 1 is drawn!
  32.     forecolor 273
  33.     CIRCLE (100,100),50
  34.     PICTURE OFF
  35.     a$=PICTURE$
  36.  
  37.     PICTURE ON
  38.     forecolor 137
  39.     LINE (100,100)-(200,200)
  40.     PICTURE OFF
  41.     b$ = PICTURE$
  42.  
  43.     filename$ = FILES$(0)
  44.     OPEN filename$ FOR OUTPUT AS #1
  45.     PRINT #1, 2
  46.     PRINT #1, LEN(a$)
  47.     PRINT #1, a$
  48.     PRINT #1, LEN(b$)
  49.     PRINT #1, b$
  50.     CLOSE #1
  51.  
  52. END
  53.  
  54.